﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace DFGK_WMS.Context.Migrations
{
    public partial class 西安物料数据表 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "ClassCode",
                table: "TUsers");

            migrationBuilder.DropColumn(
                name: "ShiftCode",
                table: "TUsers");

            migrationBuilder.DropColumn(
                name: "ShiftTime",
                table: "TUsers");

            migrationBuilder.CreateTable(
                name: "conf_Materials",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false),
                    Material_no = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
                    Material_desc = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: true),
                    Material_type = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    Del_mark_factory = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: true),
                    Del_mark = table.Column<string>(type: "nvarchar(16)", maxLength: 16, nullable: true),
                    Material_unit = table.Column<string>(type: "nvarchar(16)", maxLength: 16, nullable: true),
                    Material_group = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    Group_desc = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: true),
                    Length = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    Width = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    Weight = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    Unit = table.Column<string>(type: "nvarchar(16)", maxLength: 16, nullable: true),
                    Rough_weight = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    Net_weight = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    Weight_unit = table.Column<string>(type: "nvarchar(16)", maxLength: 16, nullable: true),
                    Volume = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    Volume_unit = table.Column<string>(type: "nvarchar(16)", maxLength: 16, nullable: true),
                    Shelf_life = table.Column<string>(type: "nvarchar(16)", maxLength: 16, nullable: true),
                    Risk_mark = table.Column<string>(type: "nvarchar(16)", maxLength: 16, nullable: true),
                    Batch_properties = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
                    Asset_attribute = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
                    Material_type_desc = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: true),
                    Factory = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    Purchase_grp = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
                    Group_name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true),
                    Purchase_org = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: true),
                    Delivery_company = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: true),
                    Product_group = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
                    Product_group_desc = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: true),
                    Batch_mark = table.Column<string>(type: "nvarchar(16)", maxLength: 16, nullable: true),
                    Serialno_param = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: true),
                    Test_mark = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: true),
                    Create_date = table.Column<DateTime>(type: "datetime2", nullable: true),
                    Update_date = table.Column<DateTime>(type: "datetime2", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_conf_Materials", x => x.Id);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "conf_Materials");

            migrationBuilder.AddColumn<string>(
                name: "ClassCode",
                table: "TUsers",
                type: "nvarchar(2)",
                maxLength: 2,
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "ShiftCode",
                table: "TUsers",
                type: "nvarchar(2)",
                maxLength: 2,
                nullable: true);

            migrationBuilder.AddColumn<DateTime>(
                name: "ShiftTime",
                table: "TUsers",
                type: "datetime2",
                nullable: true);
        }
    }
}
